Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace boost hash usage with TfHash in pxr/base/vt #2176

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

nvmkuruc
Copy link
Collaborator

@nvmkuruc nvmkuruc commented Jan 19, 2023

Description of Change(s)

Requires #2173, #2304, #2298

To remove the dependency of pxr/base/vt on boost's hashing functions

  • VtDictionary defers its hashing to TfHash's default std::map hashing
  • VtArray implements a TfHashAppend overload to take advantage of the hashability of its contiguous elements. hash_value has been modified to use this via TfHash.
  • Remove explicit hash_value support in hash.h as TfHash will fallback to hash_value if no explicit TfHashAppend is defined. This may change the order of which hash implementation is chosen (now preferring TfHashAppend to hash_value) but the implementations should not vary for most types.
  • testVtCpp now provides test coverage for VtArray hashing
  • Since TfHash supports hashing via std::type_index and std::pair, an explicit implementation hashing the type index pair is no longer necessary

Fixes Issue(s)

-#2172 (additional PRs forthcoming)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@sunyab
Copy link
Contributor

sunyab commented Jan 27, 2023

Filed as internal issue #USD-7931

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants